
<?php 
		if (!empty($this->display['complaintResult'])): ?>
<table id="salesReportResult">

	<tr>
		<th colspan="8">Prepared by: <?php echo $_SESSION['employee']->getEmployeeId(); ?>-<?php echo $_SESSION['employee']->getFirstName(); ?> <?php echo $_SESSION['employee']->getLastName(); ?></th>
	</tr>
	<tr>
		<th>Sales Id</th>
		<th>Product name</th>
		<th>Count</th>
		<th>Amount</th>
		<th>Accountable</th>
		<th>Processed By</th>
		<th>Date Processed</th>
		<th>Reason</th>
	</tr>	
	
	<?php 
			foreach ($this->display['complaintResult'] as $complaint): 
			?>
			<tr>
				<td><?php echo $complaint->getSalesId() ?></td>
				<td><?php echo $complaint->getProductName() ?></td>
				<td><?php echo $complaint->getProductCount() ?></td>
				<td><?php echo $complaint->getProductPrice() ?></td>
				<td><?php echo $complaint->getAccountable() ?></td>
				<td><?php echo $complaint->getProcessedBy() ?></td>
				<td><?php echo $complaint->getComplaintDate() ?></td>
				<td><?php echo $complaint->getReason() ?></td>
			</tr>
			<?php
			endforeach;
		?>
</table>
<script>
	$(".exportToExcelDiv").css("display","block");
</script>
<?php else: ?>
		<script>
			$("#exportToExcelDiv").css("display","none");
		</script>
		<div id="resultDiv">
			<span>No result found.</span>
		</div>
<?php endif; ?>

